package com.nbsaas.boot.controller.store;

import com.nbsaas.boot.config.ext.apis.ConfigExtApi;
import com.nbsaas.boot.rest.response.ResponseObject;
import com.nbsaas.boot.storage.ext.domain.config.AliOssConfig;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
*  对外控制器
*/
@RequiresAuthentication
@RestController
@RequestMapping("/config")
public class ConfigStoreController {


    @Resource
    private ConfigExtApi configExtApi;



    @RequestMapping("/viewAliOss")
    public ResponseObject<AliOssConfig> viewAliOss() {
        return configExtApi.info(AliOssConfig.class);
    }

    @RequestMapping("/configAliOss")
    public ResponseObject<AliOssConfig> configAliOss(AliOssConfig smsConfig) {
        return configExtApi.configData(smsConfig);
    }

}